#include "Startpage.h"
#include "arduino.h"
#include "lvgl.h"
#include "WiFi_AT.h"
#include "../Display/Display.h"
#include "../Resource/ResourcePool.h"
#include "../Resource/Image/start30.h"
#include "../Resource/Image/start70.h"

#define COLOR_GREY      lv_color_hex(0x333333)
#define COLOR_ORANGE    lv_color_hex(0xff931e)


Weather_Info_t Sjz;
Weather_Info_t Hz;
Weather_Info_t Qhd;
Weather_Info_t Bj;
Weather_Info_t Sh;

void StartpageInit(void)
{
    wifi_init();
    wifi_connecting();
    // 屏幕初始化
	Display_Init();
    tft.setSwapBytes(true); // 这行一定要加，不然图片颜色不准
    tft.pushImage(0, 0,  240, 240, image_data_start30);
    GetWeather("shijiazhuang", &Sjz);
    GetWeather("hangzhou", &Hz);
    tft.pushImage(37, 162,  166, 32, image_data_start70);
    GetWeather("qinhuangdao", &Qhd);
    GetWeather("beijing", &Bj);
    GetWeather("shanghai", &Sh);

}